package tp.pr5.mv.instructions.jump;


import tp.pr5.mv.Instruction;
import tp.pr5.mv.Opcode;
import tp.pr5.mv.ProgramCounter;

public class BF extends ConditionalJumps {
	
	
    public BF() {
		
		op = Opcode.BF;
	}
    
	public BF( int n ) {       // Constructor con parámetro (n).
		
		op = Opcode.BF;
		this.n = n;
		
	}
	
	public void analyzeAndJump ( int a, ProgramCounter pc ) {
		
		if ( a == 0 )              // Si a es cero, se hace el salto directo.
			pc.setPC( n - 1 );
		
	}
	
	public Instruction create ( int par ) {
		return new BF( par );
	}


}
